﻿using System.Xml.Serialization;

namespace XmlSerializerLearning
{
    [XmlRootAttribute("PurchaseOrder", Namespace = "http://www.cpandl.com",IsNullable = false)]
    public class PurchaseOrder
    {
        public Address ShipTo;
        public string OrderDate;
        /* The XmlArrayAttribute changes the XML element name
         from the default of "OrderedItems" to "Items". */
        [XmlArrayAttribute("Items")]
        public OrderedItem[] OrderedItems;
        public decimal SubTotal;
        public decimal ShipCost;
        public decimal TotalCost;
    }
}
